package cn.micro.keep.accounts.api;

public enum ResponseEnum implements IErrorCode {

    SUCCESS(200, "操作成功"),
    FAILED(500, "操作失败"),
    VALIDATE_FAILED(404, "参数检验失败"),
    UNAUTHORIZED(401, "暂未登录或token已经过期"),
    FORBIDDEN(403, "没有相关权限"),
    ADD_SUCCESS(200, "添加成功"),
    ADD_FAIL(500, "添加失败"),
    EDIT_SUCCESS(200, "修改成功"),
    EDIT_FAIL(500, "修改失败"),
    DELETE_SUCCESS(200, "删除成功"),
    DELETE_FAIL(500, "删除失败"),

    REPEAT_SUBMIT_ERROR(510, "您的请求已提交，请不要重复提交或等待片刻再尝试！"),

    VERIFY_CODE_TIMEOUT(511, "验证码已过期！"),

    VERIFY_CODE_ERROR(512, "验证码错误！"),
    ;


    private Integer code;
    private String message;

    private ResponseEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public Integer getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }
}
